<?php

namespace app\api\controller;
use think\Controller;

class Base extends Controller
{
    protected function _initialize()
    {
        $userInfo = session('user');
        if(empty($userInfo))
        {
            exit(json_encode(['code'=>100,'msg'=>'登录超时，请重新登录！','data'=>'','success'=>false]));
        }
    }
}